package com.ruoyi.system.service.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.core.domain.entity.Article;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.mapper.ArticleMapper;
import com.ruoyi.system.service.IArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ArticleServiceImpl  implements IArticleService {

    @Autowired
    private ArticleMapper articleMapper;

    @Override
    @DataSource(DataSourceType.SLAVE)
    public Article selectArticle(Long Id) {
        return articleMapper.selectArticleById(Id);
    }
}
